
// B参考代码

#include <bits/stdc++.h>
const int MAXN = 50 + 5;
char S[MAXN][MAXN], T[MAXN][MAXN];
int n, m;

int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i)
    scanf("%s", S[i] + 1);
  for (int i = 1; i <= m; ++i)
    scanf("%s", T[i] + 1);
  for (int a = 1; a <= n - m + 1; ++a) {
    for (int b = 1; b <= n - m + 1; ++b) { // 以 (a,b) 为左上角的子矩阵
      bool flag = 1;
      for (int i = 1; i <= m; ++i) {
        for (int j = 1; j <= m; ++j) {
          // S: S[i+a-1][j+b-1]// T:          T[i][j]
          if (S[i + a - 1][j + b - 1] != T[i][j]) {
            flag = 0;
            break;
          }
        }
        if (!flag)
          break;
      }
      if (flag) {
        printf("%d %d\n", a, b);
        return 0;
      }
    }
  }
  return 0;
}
